{% extends 'index.twig' %}

{% block extraHead %}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.15&key=AIzaSyCTinxPTA7JABWy5dJqdrbKp6QVKxbs0DE"></script>
<script src="/js/marker.js"></script>
<style>
.style1 * {
	font-size: 14px !important;
}
.marker {
	color: #990000;
	margin-left: -160px !important;
	margin-top: -170px !important;
	font-family: 'Open Sans', sans-serif !important;
	font-size: 12px !important;
	font-weight: 700;
	line-height: 25px;
}
</style>
{% endblock %}

{% block content %}
<div id="map-canvas" style="height: 550px; width: 100%;"></div>

					

		
			<!-- Content -->
		
			
			<div id="main-wrapper" style="padding-top: 1em;">

				<!-- Wide Content -->
{# 					<section id="content" class="container" style="text-align: center;">#}
{# 						<header style="margin-bottom: 0.5em !important;">#}
{# 							<h2>{{ page.labels|langdata(lang)|raw }}</h2>#}
{# 						</header>#}
{# 						<ul class="style1">#}
{# 							<li>Unit 201, 29 Apollo Drive, Rosedale, Auckland</li>#}
{# 							<li>PO Box 35770, Browns Bay 0753</li>#}
{# 							<li><span><b>Phone:</b></span> 0064 9 4801225</li>#}
{# 							<li><span><b>Fax:</b></span> 0064 9 4798090</li>#}
{# 							<li>info@northernlegal.co.nz</li>#}
{# 						</ul>#}
{# 					</section>#}
					
				</div>
			


<script type="text/javascript">
var map;
function initialize() {
	var myLatLng = new google.maps.LatLng(-36.744075, 174.733074);
	var posLatLng = new google.maps.LatLng(-36.744075 - 0.0025, 174.733074 - 0.0034);
  var mapOptions = {
    zoom: 16,
    center: myLatLng,
		styles: [  { 'featureType': 'water', 'stylers': [{ 'visibility': 'on' },{ 'color': '#acbcc9' } ]  },{ 'featureType': 'landscape', 'stylers': [{ 'color': '#f2e5d4' } ]  },{ 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [{ 'color': '#c5c6c6' } ]  },{ 'featureType': 'road.arterial', 'elementType': 'geometry', 'stylers': [{ 'color': '#e4d7c6' } ]  },{ 'featureType': 'road.local', 'elementType': 'geometry', 'stylers': [{ 'color': '#fbfaf7' } ]  },{ 'featureType': 'poi.park', 'elementType': 'geometry', 'stylers': [{ 'color': '#c5dac6' } ]  },{ 'featureType': 'administrative', 'stylers': [{ 'visibility': 'on' },{ 'lightness': 33 } ]  },{ 'featureType': 'road'  },{ 'featureType': 'poi.park', 'elementType': 'labels', 'stylers': [{ 'visibility': 'on' },{ 'lightness': 20 } ]  },{  },{ 'featureType': 'road', 'stylers': [{ 'lightness': 20 } ]  }],
    
  };
  map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

	var html = 
		'<div>Unit 201, 29 Apollo Drive, Rosedale, Auckland</div>' +
		'<div>PO Box 35770, Browns Bay 0753</div>' +
		'<div>Phone: 0064 9 4801225</div>' +
		'<div>Fax: 0064 9 4798090</div>' +
		'<div>info@northernlegal.co.nz</div>';
		
	var marker = new MarkerWithLabel({
		icon: {
		  url: '/images/marker.png'
		},
		position: posLatLng,
		map: map,
		zIndex: 999,
		labelContent: html,
		labelClass: 'marker'
	});
}
google.maps.event.addDomListener(window, 'load', initialize);

// var address = "29 Apollo Drive, Rosedale, Auckland";
// geocoder = new google.maps.Geocoder();

// geocoder.geocode( { 'address': address}, function(results, status) {
//   if (status == google.maps.GeocoderStatus.OK) {
// //   	console.log(results[0].geometry.location);
// // 		results[0].geometry.location.k = -36.744075;
// // 		results[0].geometry.location.D = 174.733074;
// 		results[0].geometry.location = new google.maps.LatLng(-36.744075, 174.733074);
// 		console.log(results[0].geometry.location);
//   	var ctrLatlng = {lat: results[0].geometry.location.k, lng: results[0].geometry.location.D};
//   	var myLatlng = results[0].geometry.location;
//   	myLatlng.k -= 0.0025;
//   	myLatlng.D -= 0.0034;
//   	var myCountryname = results[0].geometry.location;
//   	ll = myLatlng;
//   	var myOptions = {
// 		   zoom: 16,
// 		   scrollwheel: false,
// 		   center: ctrLatlng,
//  		   mapTypeId: google.maps.MapTypeId.ROADMAP

//   	}
// 		var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions);
// 			//map.setUIToDefault();
// 			//map.setMapType(G_HYBRID_MAP);
// 		map.setOptions({
// 			styles: [  { 'featureType': 'water', 'stylers': [{ 'visibility': 'on' },{ 'color': '#acbcc9' } ]  },{ 'featureType': 'landscape', 'stylers': [{ 'color': '#f2e5d4' } ]  },{ 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [{ 'color': '#c5c6c6' } ]  },{ 'featureType': 'road.arterial', 'elementType': 'geometry', 'stylers': [{ 'color': '#e4d7c6' } ]  },{ 'featureType': 'road.local', 'elementType': 'geometry', 'stylers': [{ 'color': '#fbfaf7' } ]  },{ 'featureType': 'poi.park', 'elementType': 'geometry', 'stylers': [{ 'color': '#c5dac6' } ]  },{ 'featureType': 'administrative', 'stylers': [{ 'visibility': 'on' },{ 'lightness': 33 } ]  },{ 'featureType': 'road'  },{ 'featureType': 'poi.park', 'elementType': 'labels', 'stylers': [{ 'visibility': 'on' },{ 'lightness': 20 } ]  },{  },{ 'featureType': 'road', 'stylers': [{ 'lightness': 20 } ]  }],

// 			// mapTypeId: google.maps.MapTypeId.SATELLITE
// 		});


// 		var html = 
// 			'<div>Unit 201, 29 Apollo Drive, Rosedale, Auckland</div>' +
// 			'<div>PO Box 35770, Browns Bay 0753</div>' +
// 			'<div>Phone: 0064 9 4801225</div>' +
// 			'<div>Fax: 0064 9 4798090</div>' +
// 			'<div>info@northernlegal.co.nz</div>';
		
// 		var marker = new MarkerWithLabel({
// 		      icon: {
// 		          url: '/images/marker.png'
// 		      },
// 		      position: myLatlng,
// 		      map: map,
// 		      zIndex: 999,
// 		      labelContent: html,
// 		      labelClass: 'marker'
// 		});
// //     var image = '/images/marker.png';
// //     var beachMarker = new google.maps.Marker({
// //     	position: myLatlng,
// //         map: map,
// //         icon: image
// //   	});
//    } else {
//       document.getElementById('map_canvas').innerHTML='Map currently not available.';
//    }
// });
</script>
{% endblock %}
